using System;
using System.Collections.Generic;
using System.Text;
using BuildingBasicDomain;
using CommonTypes;


namespace BuildingStructuralElements
{



        public class Temperature 
        {

            // Object name, Serves as object ID and key, needs to be unique.
            protected FieldWithUndo m_Name;

            // Objects position
            protected FieldWithUndo m_Position;

            FieldWithUndo m_Length;

            public double Length
            {
                get { return (double)m_Length.Value; }
                set { m_Length.Value = value; }
            }

            FieldWithUndo m_Temperature;

            public double TemperatureValue
            {
                get { return (double)m_Temperature.Value; }
                set { m_Temperature.Value = value; }
            }

            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="name">The name for the tmpereature</param>
            /// <param name="length">The length of the temperature application</param>
            public Temperature(string name, Vector position, double length, double temperature)
         
            {
                m_Length = new FieldWithUndo(this);
                m_Temperature = new FieldWithUndo(this);

                m_Length.Value = length;
                m_Temperature.Value = temperature;
            }

            public void SetLength(double val)
            {
                m_Length.SetNewValue(val);
            }

            public void SetLengthAndPos(double l, Vector pos)
            {
                m_Length.SetNewValue(l);
                m_Position.SetNewValue(pos);
            }

            public void SetTemperature(double val)
            {
                m_Temperature.SetNewValue(val);
            }
        }






}
